/*
 * addon_intf.h
 *
 *  Created on: 2010-1-7
 *      Author: gavinkwoe
 */

#ifndef ADDON_OBSERVER_H_
#define ADDON_OBSERVER_H_

#include "addon_features.h"
#include "addon_std.h"
#include "addon_objbase.h"

/*************************************************************************
* INTERFACE
*************************************************************************/

ADDON_INTERFACE_( IAddonObserver, 1, IObject )
{
	__INHERIT_FROM( IObject )

	ADDON_METHOD( OnNotify )	( ADDON_REF(IObject) thiz, IN char * ntf_name, IN void ** ntf_args );
};

/*************************************************************************
* MACRO
*************************************************************************/

#define IAddonObserver_VTBL( p )				ADDON_GET_VTBL_(p, IAddonObserver)
#define IAddonObserver_CALL( p, a )				IAddonObserver_VTBL(p)->a
#define IAddonObserver_OnNotify( p, a, b )		IAddonObserver_CALL( p, OnNotify )( p, a, b )

#endif /* ADDON_OBSERVER_H_ */
